// Bachelor of Software Engineering 
// Media Design School 
// Auckland
// New Zealand
// 
// (c) 2005 - 2014 Media Design School 
// 
// File Name : Card.h
// Description : Card header
// Author : Serge Radinovich
// Mail : srad015@hotmail.com

#pragma once

#include "GameObject.h"

class Game;

enum ERANK
{
	ACE,
	TWO,
	THREE,
	FOUR,
	FIVE,
	SIX,
	SEVEN,
	EIGHT,
	NINE,
	TEN,
	JACK,
	QUEEN,
	KING,
};

enum ESUIT
{
	CLUB,
	SPADE,
	HEART,
	DIAMOND
};

class Card : public GameObject
{
	ERANK m_Rank;
	ESUIT m_Suit;
	bool m_bFaceUp;
	bool m_bColorRed;					//false = black
	bool m_TableauPointsGiven;			//Whether card has been used to give player points through the tableau
	bool m_FoundationPointsGiven;		//Whether card has been used to give player points through the foundation
	
public:
	
	const static int s_kiWidth = 72;			//Bitmap dimensions
	const static int s_kiHeight = 96;
	
	Card();
	Card(ERANK, ESUIT);
	~Card(void);

	bool operator==(const Card& _rhs);


	int GetRank() const;
	int GetSuit() const;
	int GetColour() const; //0 is black, 1 is red
	bool IsFaceUp() const;
	void Flip();

	void SetTableauPointsGiven(bool _b);
	void SetFoundationPointsGiven(bool _b);
	bool GetTableauPointsGiven();
	bool GetFoundationPointsGiven();

	void Draw();
	void UnDraw();
};

